package net.alpcontrol.bi.colligation.service.impl;

import net.alpcontrol.bi.colligation.entity.Company;
import net.alpcontrol.bi.colligation.mapper.CompanyMapper;
import net.alpcontrol.bi.colligation.service.ICompanyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 丛庆
 * @since 2020-08-31
 */
@Service
@Transactional
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements ICompanyService {

    @Autowired
    private CompanyMapper companyMapper;

    /**
      *  分页查询
      * @param bootStrapTable
      * @param company
      * @return
      */
    @Override
    public IPage<Company> selectPage(Page<Company> page) {
        return companyMapper.selectPage(page,null);
    }

    /**
     *      *  查询所有公司数据
     *      * @param bootStrapTable
     *      * @param company
     *      * @return
     *      
     */
    @Override
    public List<Company> selectList() {
        return companyMapper.selectList(null);
    }
}
